package dyyx;

import org.apache.kafka.clients.producer.ProducerRecord;

import dyyx.util.CommUtil;
import dyyx.util.ConfigUtil;

public class Hello {
	
	public static void main(String[] args) throws Exception {
			
		System.out.println("hello,kafkademo");
		
		System.out.println(ConfigUtil.getAllConfig());
		String name = "xxx";
		try {
		    CommUtil.readProperties(name);
		}catch(Throwable e) {
			System.out.println(e);
			e.printStackTrace();
		}
		System.out.println(CommUtil.getAllResourceUrlMap());
		System.out.println("app="+ConfigUtil.get("app"));

		System.out.println(AppUtil.producer);
		ProducerRecord<String, String> record = new ProducerRecord<String, String>("topic","hello");
		AppUtil.producer.send(record);
		

	}
}
